#!/bin/bash -e
json_str='{"username":"xcy","password":"123"}'
secret_key='rOrLmAHHvFy2kP3uSTE5GHnhyebwJ35s'

base64_str=`echo -n $json_str| base64`
echo $base64_str

sign_str=`echo -n $json_str | base64 | xargs echo -n | openssl sha1  -hmac $secret_key | awk '{print $2}'`
echo $sign_str

curl "http://192.168.2.72:25000/auth/login/account" -d "params_str=$base64_str:$sign_str"
